package com.guaoran.other.template;

/**
 * @author : guaoran
 * @Description : <br/>
 * @date :2018/12/20 15:00
 */
public abstract class AbstractClass {
    protected void afterMethod(){
        System.out.println("afterMethod");
    }

    protected void beforeMethod(){
        System.out.println("beforeMethod");
    }
    protected abstract void doSomething();

    public void templateMethod() {
        afterMethod();
        doSomething();
        beforeMethod();
    }
}
